package test.testsensor;

import android.app.Application;
import android.content.Context;
import android.text.TextUtils;

import com.baidu.mapapi.CoordType;
import com.baidu.mapapi.SDKInitializer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;



public class MyApplication extends Application {

    private static Context context;
    private static boolean mDebug = true;

    public static boolean isDebug(){
        return mDebug;
    }


    private AtomicInteger mSequenceGenerator = new AtomicInteger();

    @Override
    public void onCreate() {
        super.onCreate();
        try {
            Class.forName("android.os.AsyncTask");
        }
        catch(Throwable ignore) {
            // ignored
        }
        context = getApplicationContext();
        initBaiduMap();
    }

    private void initBaiduMap() {
        // 在使用 SDK 各组间之前初始化 context 信息，传入 ApplicationContext
        SDKInitializer.initialize(getApplicationContext());
        //自4.3.0起，百度地图SDK所有接口均支持百度坐标和国测局坐标，用此方法设置您使用的坐标类型.
        //包括BD09LL和GCJ02两种坐标，默认是BD09LL坐标。
        SDKInitializer.setCoordType(CoordType.BD09LL);
    }



    public static Context getContext(){
        return context;
    }
}
